from django.urls import re_path
from netdevops import consumers

#需要在程序下创建一个consumers.py文件

websocket_urlpatterns=[
    re_path(r'ws/(?p<group>\w+)/$',consumers.ChatConsumer.as_asgi())
]